package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* Created by Mybatis Generator on 2020/03/11
*/
public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

	Employee selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);
    List<Employee> queryForList(QueryObject qo);

	void insertRelation(@Param("employeeId") Long employeeId, @Param("roleId") Long roleId);

	void deleteRelation(Long employeeId);
	List<String> selectExpByEmpId(Long employeeId);

	void batchDelete(Long[] ids);

	void batchDeleteRelation(Long[] ids);

	Employee getByName(String principal);
}